# -*- coding: utf-8 -*-
"""
------------------------------------------------------------------------------
    File Name:  redis_subscribe
    Author   :  wanwei1029
    Date     :  2018/10/1
    Desc     :
------------------------------------------------------------------------------
"""
from samp.module.redis.publish_subscribe.RedisHelper import RedisHelper
import samp.samp_logging as sl

logger = sl.get_logger('redis_subscribe')


def samp():
    """
    """
    subsciber = RedisHelper()
    sub = subsciber.subscribe()
    while True:
        msg = sub.parse_response()
        logger.info(msg)


if __name__ == '__main__':
    test_method = "samp"
    if test_method == "samp":
        samp()
